package com.userautentification.entities;

import java.util.Set;

import com.userautentification.utils.BaseObject;

public class Persona extends BaseObject {

	private String name;
	private String lastName;
	private String email;
	private String webSite;
	private Set <Phone> phone;
	private Role role;
	private String direccion;
	private String barrio;
	private String localidad;
	private String provincia;
	
	private Long id;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getWebSite() {
		return webSite;
	}

	public void setWebSite(String webSite) {
		this.webSite = webSite;
	}

	

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	
	public Set<Phone> getPhone() {
		return phone;
	}

	public void setPhone(Set<Phone> phone) {
		this.phone = phone;
	}

	public String getDireccion() {
		return direccion;
	}

	public void setDireccion(String direccion) {
		this.direccion = direccion;
	}

	public String getBarrio() {
		return barrio;
	}

	public void setBarrio(String barrio) {
		this.barrio = barrio;
	}

	public String getLocalidad() {
		return localidad;
	}

	public void setLocalidad(String localidad) {
		this.localidad = localidad;
	}

	public String getProvincia() {
		return provincia;
	}

	public void setProvincia(String provincia) {
		this.provincia = provincia;
	}

	public void addToPhone(Phone phone){
		this.getPhone().add(phone);
		phone.getPersona().add(this);
	}

	public void removeFromPhone(Phone phone){
		this.getPhone().remove(phone);
		phone.getPersona().remove(this);
	}
	@Override
	public void equals() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		String datosPersona = "Los datos son: ID: " + this.getId()
				+ " Nombre: " + getName() + " Apellido: " + getLastName()
				+ " Email: " + getEmail() + " Website: " + getWebSite()
				+ " Direccion: " + getDireccion() + " Barrio: " + getBarrio();

		return datosPersona;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

}
